﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DAO;
using DTO;

namespace BUS
{
    public class KhachHangBUS
    {
        public DataTable LayDanhSachKhachHang()
        {
            KhachHangDAO khDao = new KhachHangDAO();
            return khDao.LayDanhSachKhachHang();
        }
        public void ThemKhachHang(KhachHangDTO khachhang)
        {
            KhachHangDAO khDao = new KhachHangDAO();
            khDao.ThemKhachHang(khachhang);
        }
        public void CapNhatKhachHang(KhachHangDTO khachhang)
        {
            KhachHangDAO khDao = new KhachHangDAO();
            khDao.CapNhatKhachHang(khachhang);
        }
        public void XoaKhachHang(KhachHangDTO khachhang)
        {
            KhachHangDAO khDao = new KhachHangDAO();
            khDao.XoaKhachHang(khachhang);
        }
        public DataTable TimKiemKH(string HoTen, string SoDT)
        {
            KhachHangDAO khdao = new KhachHangDAO();
            return khdao.TimKH(HoTen, SoDT);
        }
        public DataTable TimKhachHang(int maKH)
        {
            KhachHangDAO khDao = new KhachHangDAO();
            return khDao.TimKhachHang(maKH);
        }
    }
}
